From c76b9021351d5681f1d8ae9e5daafe10928c9a68 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 30 Aug 2005 16:53:40 +0000 Subject: [PATCH] When generating an exception frame for injection into a guest, that frame's base should be aligned on a 16-byte boundary (as is done by the hardware). Signed-off-by: Jan Beulich --- xen/arch/x86/x86_64/entry.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index e1f39aa3cd..6d8fb1bac9 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -339,7 +339,8 @@ create_bounce_frame: 1: /* In kernel context already: push new frame at existing %rsp. */ movq UREGS_rsp+8(%rsp),%rsi andb $0xfc,UREGS_cs+8(%rsp) # Indicate kernel context to guest. -2: movq $HYPERVISOR_VIRT_START,%rax +2: andq $~0xf,%rsi # Stack frames are 16-byte aligned. + movq $HYPERVISOR_VIRT_START,%rax cmpq %rax,%rsi jb 1f # In +ve address space? Then okay. movq $HYPERVISOR_VIRT_END+60,%rax -- 2.30.2